package com.dream.plugin;

import com.dream.plugin.simpledao.tag.SColumn;
import com.dream.plugin.simpledao.tag.SId;
import com.dream.plugin.simpledao.tag.STable;

import java.io.Serializable;
import java.util.StringJoiner;

@STable("user")
public class UserDo implements Serializable {

    @SId("id")
    private Integer id;

    @SColumn("name")
    private String name;

    @SColumn("age")
    private Integer age;

    @SColumn("sex")
    private String sex;

    @Override
    public String toString() {
        return new StringJoiner(", ", UserDo.class.getSimpleName() + "[", "]")
                .add("id=" + id)
                .add("name='" + name + "'")
                .add("age=" + age)
                .add("sex='" + sex + "'")
                .toString();
    }

    public Integer getId() {
        return id;
    }

    public UserDo setId(Integer id) {
        this.id = id;
        return this;
    }

    public String getName() {
        return name;
    }

    public UserDo setName(String name) {
        this.name = name;
        return this;
    }

    public Integer getAge() {
        return age;
    }

    public UserDo setAge(Integer age) {
        this.age = age;
        return this;
    }

    public String getSex() {
        return sex;
    }

    public UserDo setSex(String sex) {
        this.sex = sex;
        return this;
    }
}
